IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'ClientCreate')
	BEGIN
		DROP  Procedure  ClientCreate
	END

GO

CREATE Procedure ClientCreate
(
	@guid nvarchar(50),
	@code nvarchar(10),
	@clientId int output
)
AS

INSERT INTO Clients (Guid, Code) VALUES (@guid, @code)
	
SET @clientId = SCOPE_IDENTITY()

GO